<template>
  <div class="loading">
    <div>L</div>
    <div>O</div>
    <div>A</div>
    <div>D</div>
    <div>I</div>
    <div>N</div>
    <div>G</div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</template>

<script>
  export default {}
</script>

<style lang="scss" scoped>
  .loader {
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -mos-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    text-align: center;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 80%;
    overflow: visible;
    position: absolute;
    height: 36px;
    div {
      position: absolute;
      height: 36px;
      width: 30px;
      margin: 0 10px;
      opacity: 0;
      animation: move 3s linear infinite;
      -o-animation: move 3s linear infinite;
      -moz-animation: move 3s linear infinite;
      -webkit-animation: move 3s linear infinite;
      transform: rotate(180deg);
      -o-transform: rotate(180deg);
      -moz-transform: rotate(180deg);
      -webkit-transform: rotate(180deg);
      color: #fff;
      font-size: 3em;
      &:nth-child(8):before {
        background: #db2f00;
      }

      &:nth-child(8):before,
      &:nth-child(9):before {
        content: '';
        position: absolute;
        bottom: -15px;
        left: 0;
        width: 30px;
        height: 30px;
        border-radius: 100%;
      }

      &:nth-child(9):before {
        background: #f2f2f2;
      }

      &:nth-child(10):before {
        bottom: -15px;
        height: 30px;
        background: #13a3a5;
      }

      &:after,
      &:nth-child(10):before {
        content: '';
        position: absolute;
        left: 0;
        width: 30px;
        border-radius: 100%;
      }

      &:after {
        bottom: -40px;
        height: 5px;
        background: #39312d;
      }

      &:nth-child(2) {
        animation-delay: 0.3s;
        -o-animation-delay: 0.3s;
        -moz-animation-delay: 0.3s;
        -webkit-animation-delay: 0.3s;
      }

      &:nth-child(3) {
        animation-delay: 0.6s;
        -o-animation-delay: 0.6s;
        -webkit-animation-delay: 0.6s;
      }

      &:nth-child(4) {
        animation-delay: 0.9s;
        -o-animation-delay: 0.9s;
        -moz-animation-delay: 0.9s;
        -webkit-animation-delay: 0.9s;
      }

      &:nth-child(5) {
        animation-delay: 1.2s;
        -o-animation-delay: 1.2s;
        -moz-animation-delay: 1.2s;
        -webkit-animation-delay: 1.2s;
      }

      &:nth-child(6) {
        animation-delay: 1.5s;
        -o-animation-delay: 1.5s;
        -moz-animation-delay: 1.5s;
        -webkit-animation-delay: 1.5s;
      }

      &:nth-child(7) {
        animation-delay: 1.8s;
        -o-animation-delay: 1.8s;
        -moz-animation-delay: 1.8s;
        -webkit-animation-delay: 1.8s;
      }

      &:nth-child(8) {
        animation-delay: 2.1s;
        -o-animation-delay: 2.1s;
        -moz-animation-delay: 2.1s;
        -webkit-animation-delay: 2.1s;
      }

      &:nth-child(9) {
        animation-delay: 2.4s;
        -o-animation-delay: 2.4s;
        -moz-animation-delay: 2.4s;
        -webkit-animation-delay: 2.4s;
      }

      &:nth-child(10) {
        animation-delay: 2.7s;
        -o-animation-delay: 2.7s;
        -moz-animation-delay: 2.7s;
        -webkit-animation-delay: 2.7s;
      }
    }
  }

  @keyframes move {
    0% {
      right: 0;
      opacity: 0;
    }
    35% {
      right: 41%;
    }
    35%,
    65% {
      -webkit-transform: rotate(0);
      transform: rotate(0);
      opacity: 1;
    }
    65% {
      right: 59%;
    }
    to {
      right: 100%;
      -webkit-transform: rotate(-180deg);
      transform: rotate(-180deg);
    }
  }

  @-webkit-keyframes move {
    0%,
    to {
      opacity: 0;
    }
    0% {
      right: 0;
    }
    35% {
      right: 41%;
    }
    35%,
    65% {
      -webkit-transform: rotate(0);
      transform: rotate(0);
      opacity: 1;
    }
    65% {
      right: 59%;
    }
    to {
      right: 100%;
      -webkit-transform: rotate(-180deg);
      transform: rotate(-180deg);
      opacity: 0;
    }
  }
</style>
